.modal {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transition: visibility 0s .6s, opacity .5s linear;
}

.modal_visible {
  visibility: visible;
  opacity: 1;
  background-color: rgba(0,0,0, 0.5);
  transition-delay: 0s;
}

.popup {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s .6s, opacity 0.5s linear;
  display: flex;
  flex-direction: column;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  color: #000;
  max-width: 430px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  z-index: 2;
}

.popup_visible {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.popup-container {
  width: calc(100% - 36px * 2);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.popup__exit {
  display: block;
  position: absolute;
  width: 40px;
  height: 40px;
  top: -30px;
  right: -30px;
  background-image: url('../../images/close.svg');
  background-size: contain;
  z-index: -3;
  border: none;
  background-color: transparent;
  outline: none;
}

.popup__exit:hover {
  opacity: 0.6;
}

@media screen and (max-width: 500px) {
  .popup {
  top: 80px;
  max-width: 100%;
  height: 100%;
  border-radius: 16px 16px 0 0;
  }

  .popup__exit {
    display: none;
  }

  .popup-container {
    width: calc(100% - 16px * 2);
  }
}